import request from "@/utils/request";

// 查询阶段服务日志列表
export function listLog(query) {
  return request({
    url: "/service/log/list",
    method: "get",
    params: query,
  });
}

// 查询阶段服务日志详细
export function getLog(id) {
  return request({
    url: "/service/log/" + id,
    method: "get",
  });
}

// 新增阶段服务日志
export function addLog(data) {
  return request({
    url: "/service/log",
    method: "post",
    data: data,
  });
}

// 修改阶段服务日志
export function updateLog(data) {
  return request({
    url: "/service/log",
    method: "put",
    data: data,
  });
}

// 删除阶段服务日志
export function delLog(id) {
  return request({
    url: "/service/log/" + id,
    method: "delete",
  });
}

export function deleteServiceLogByProjectId(projectId) {
  return request({
    url: `/service/log/project/${projectId}`,
    method: "delete",
  });
}
